package net.skyaims.lori.context;

import net.skyaims.lori.core.Service;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;

/**
 * Created by wujianing on 14-5-17.
 */
public class Naming {

    public static void main(String[] args) {

        try {


        } catch (Exception e) {
            System.out.println(e.getMessage());
            e.printStackTrace();
        }

    }

    public static void lookup(Class<?> service) {

        ClassLoader classLoader = service.getClassLoader();

        Proxy.newProxyInstance(classLoader, new Class[]{service}, new InvocationHandler() {

            @Override
            public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
                return null;
            }

        });

    }

}
